/*
 *   Clovis
 *   Copyright (C) 2008 SFWOL
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#include "LuaState.h"

//namespace clovis {
//
// 	namespace lua {
//
// 		LuaState::LuaState(){
//
//			this->L = lua_open();
//			luaL_openlibs(this->L);
//
// 		}
//
// 		LuaState::~LuaState(){
//
// 			lua_close(this->L);
//
// 		}
//
// 		lua_State * LuaState::getCurrentLuaState(){
//
// 			return this->L;
//
// 		}
//
// 		void LuaState::loadModule(LUA_MODULE module){
//
//			switch(module){
//
//				case CORE:
//					break;
//
//				case VIDEO:
//					break;
//
//				case AUDIO:
//					break;
//
//			}
//
// 		}
//
// 		void LuaState::registerCoreModule(){
///*
//			const char Vector3::className[] = "Vector3";
//
//			Lunar<Vector3>::RegType Vector3::methods[] = {
//			  method(Vector3, set),
//			  method(Vector3, print),
//			  method(Vector3, length),
//			  method(Vector3, equal),
//			  {"add",&Vector3::add}, // une autre facon d'enregistrer une methode
//			  {0,0}
//			};
//*/
// 		}
//
//		void LuaState::registerVideoModule(){
//
//		}
//
//		void LuaState::registerAudioModule(){
//
//		}
//
//		int LuaState::executeFile(core::CString file){
//
//			if (luaL_dofile(this->L, file.toCharArray()) != 0){
//
//				return -1;
//
//			}
//
//			return 0;
//
//		}
//
//		int LuaState::executeCommand(core::CString cmd){
//
//			return dostring(this->L, cmd.toCharArray(), "__cmd__");
//
//		}
//
//		void LuaState::printErrors(){
//
//			std::cerr << ">>> " << lua_tostring(this->L, -1) << std::endl;
//
//		}
//
// 	};
//
//};
